package com.shanyu.nicefish.controller;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.shanyu.nicefish.bean.Hr;
import com.shanyu.nicefish.bean.Role;
import com.shanyu.nicefish.bean.User;
import com.shanyu.nicefish.common.JsonResult;
import com.shanyu.nicefish.common.Message;
import com.shanyu.nicefish.common.MessageUtil;
import com.shanyu.nicefish.event.OrderEvent;
import com.shanyu.nicefish.service.HrService;
import com.shanyu.nicefish.service.RoleService;
import com.shanyu.nicefish.service.Strategy;
import com.shanyu.nicefish.service.StrategyContext;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSON;
/**
 * 管理员
 *
 * @blame czj Team
 */
@RestController
@Api(tags = "角色相关接口")
@RequestMapping("/role")
public class RoleController {

    @Autowired
    private RoleService roleService;

    @GetMapping("/selectRolePage")
    @ApiOperation("分页查询角色列表")
    public JsonResult<List<Role>> selectRolePage() {
        List<Role> roleList = roleService.selectRolePage();

        return JsonResult.success(roleList);
    }

    @GetMapping(value = "/map")
    public Map<String, Object> getMap() {
        Map<String, Object> map = new HashMap<>(3);
        Hr user = new Hr();
        user.setId((long) 1);
        user.setUsername("libai");

        map.put("hr信息", user);

        return map;

    }

}
